Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid creation of link field type #6237

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

ijreilly
Copy link
Collaborator

This is the first step of Link field type deprecation (#5909).
Forbid creation of link field type in product and api. Update to this type is not a concern as we do not allow the update of field type.

if (fieldMetadataInput.type === FieldMetadataType.LINK) {
throw new FieldMetadataException(
'"Link" field types are being deprecated, please use Links type instead',
FieldMetadataExceptionCode.INVALID_FIELD_INPUT,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will throw an internal server error due to an issue we have with error interception @thomtrp @Weiko

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

  • Excluded 'Link' field type from being selectable in /packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx
  • Prevented creation of 'Link' field type in /packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx
  • Added check to forbid 'LINK' field type creation in /packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts
  • Ensure FieldMetadataException is thrown for 'LINK' field type creation attempts

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ijreilly ijreilly merged commit a442492 into main Jul 12, 2024
13 of 14 checks passed
@ijreilly ijreilly deleted the remove-link-field-type-in-product branch July 12, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants